package com.efun.center.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.efun.center.entity.EmailServer;
import com.efun.center.entity.Page;
import com.efun.center.entity.search.EmailServerSearch;
import com.efun.center.mapper.EmailServerMapper;

@Service("emailServerService")
public class EmailServerService {

    @Autowired
    EmailServerMapper emailServerMapper;

    public Page<EmailServer> query(EmailServerSearch search) {
        Long total = emailServerMapper.total(search);
        List<EmailServer> data = emailServerMapper.query(search);
        return new Page<EmailServer>(search.getSize(), search.getPage(), total, data);
    }

}
